﻿<%@ Page Language="C#" MasterPageFile="~/ProductManager/ProductManage.Master" AutoEventWireup="true" CodeFile="GiftCardManage.aspx.cs" Inherits="SystemManager_GiftCardManage" Title="无标题页" %>

<%@ Register Assembly="GoShopping.Components" Namespace="BaseText" TagPrefix="cc2" %>
<%@ Register assembly="ExtensionGridView" namespace="ExtensionControls" tagprefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div>
        用户名:<cc2:ZLTextBox ID="txtUser" runat="server"/><asp:Button ID="btnSearch" 
            runat="server" Text="搜索" onclick="btnSearch_Click" /><br />
        <cc1:ExtensionGridView ID="gvUserList" runat="server" 
                AutoGenerateColumns="False" PagerText="当前第{0}页,共{1}页{2}条记录" 
                RecordCount="-1" AllowPaging="True" 
                AllowSorting="True" AutoSort="True" EmptyDataText="没有商品记录!" 
                onrowcommand="gvUserList_RowCommand" Width="800px" 
                onpageindexchanging="gvUserList_PageIndexChanging" SortAscImageUrl="" 
                SortDescImageUrl="" PageSize="15" CssClass="GridViewStyle">
                <Columns>
                    <asp:TemplateField>
                        <HeaderTemplate>
                            <asp:CheckBox ID="cbAll" runat="server" 
                                oncheckedchanged="cbAll_CheckedChanged" AutoPostBack="true" />
                        </HeaderTemplate>
                        <ItemTemplate>
                            <asp:CheckBox ID="cbSingle" runat="server" />
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="ID" Visible="false">
                        <ItemTemplate>
                            <asp:Label ID="lblID" runat="server" Text='<%# Eval("ID") %>'></asp:Label>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="用户名">
                        <ItemTemplate>
                            <asp:Label ID="lblName" runat="server" Text='<%# Eval("Name") %>'></asp:Label>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="姓名">
                        <ItemTemplate>
                            <asp:Label ID="lbtnEmail" runat="server" Text='<%# Eval("TrueName") %>'></asp:Label>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="积分">
                        <ItemTemplate>
                            <asp:Label ID="lblIntegration" runat="server" Text='<%# Eval("Integration") %>'></asp:Label>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="电话">
                        <ItemTemplate>
                            <asp:Label ID="lblPhone" runat="server" Text='<%# Eval("Telephone") %>'></asp:Label>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                </Columns>
                <HeaderStyle HorizontalAlign="Center" />
            </cc1:ExtensionGridView>
                <asp:Button ID="btnSend" runat="server" Text="赠送" Height="26px" 
                    onclientclick="return confirm(&quot;赠送吗?&quot;)" Width="65px" 
            onclick="btnSend_Click" />
            </div>
            <div id="divSendHistory" style="display:none">
                <b>发送历史:</b><br />
       <asp:ListView ID="lvSendHistory" runat="server" 
                    onpagepropertieschanging="lvSendHistory_PagePropertiesChanging">
        <LayOutTemplate>
            <table style="width:800px">
            <thead align="left">
            <th>礼品卡编号</th>
            <th>金额</th>
            <th>用户名</th>
            <th>发送时间</th>
            </thead>
            <tbody id="itemPlaceHolder" runat="server">
            </tbody>
            </table>
            <asp:DataPager ID="DataPager1" runat="server" PagedControlID="lvSendHistory" PageSize="20">
            <Fields>
            <asp:NumericPagerField />
            </Fields>
            </asp:DataPager>
        </LayOutTemplate>
        <ItemTemplate>
          <tr>
            <td>
              <asp:Label ID="lblTitle0" runat="server" Text='<%# Eval("GiftCardID") %>'></asp:Label>
            </td>
            <td>
              <asp:Label ID="Label6" runat="server" Text='<%# Eval("UserPrice") %>'></asp:Label><br />
            </td>
            <td>
              <asp:Label ID="Label1" runat="server" Text='<%# Eval("UserID") %>'></asp:Label><br />
            </td>
            <td>
              <asp:Label ID="lblDate0" runat="server" Text='<%# Eval("UserDate","{0:d}") %>'></asp:Label>
            </td>
         </tr>
        </ItemTemplate>
        </asp:ListView>
     </div>
</asp:Content>

